package com.ys.erp.stage_mall_service.bean.vo;

import com.ys.erp.stage_mall_service.bean.condition.HomeGroupAreaCondition;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author minamiyama
 * @date 2025/5/19 19:22
 */

@Schema(description = "商品聚合区列表")
@Data
@Accessors(chain = true)
public class HomeGroupAreaInfoVO {

    @Schema(description = "id")
    private Long id;

    @Schema(description = "聚合区类型")
    private String type;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "背景图")
    private String backgroundImage;

    @Schema(description = "标题前标")
    private String titleTag;

    @Schema(description = "副标题类型")
    private String subTitleType;

    @Schema(description = "副标题")
    private String subTitle;

    @Schema(description = "标题颜色")
    private String subTitleColor;

    @Schema(description = "位置")
    private Integer location;

    @Schema(description = "推荐区数据")
    private List<PutUpArea> putUpAreaList;

    @Schema(description = "是否显示分类")
    private Integer isCate;

    @Schema(description = "商品分类")
    private List<GoodsMenu> goodsCateList;

    @Schema(description = "商品设置类型")
    private String goodsSettingType;

    @Schema(description = "引入规则")
    private ImportRule importRule;

    @Schema(description = "商品信息")
    private List<GoodsInfo> goodsInfoList;

    private Integer status;


    @Schema(description = "数据推荐区")
    @Data
    public static class PutUpArea {

        @Schema(description = "标题")
        private String title;

        @Schema(description = "前三角标")
        private Integer isTop3Tag;

        @Schema(description = "商品设置类型")
        private String goodsSettingType;

        @Schema(description = "引入规则")
        private ImportRule importRule;

        @Schema(description = "商品列表")
        private List<GoodsInfo> goodsList;

        @Schema(description = "是否开启销量展示")
        private Integer isSaleNum;

    }

    @Data
    @Schema(description = "商品菜单")
    public static class GoodsMenu {

        @Schema(description = "菜单名称")
        private String menuName;

        @Schema(description = "是否置顶")
        private Integer isSticky;

        @Schema(description = "是否排序")
        private Integer isTop3Sort;

    }

    @Data
    public static class GoodsInfo {

        @Schema(description = "商品id")
        private Long goodsId;

        @Schema(description = "商品品牌")
        private String goodsBrand;

        @Schema(description = "商品图片")
        private String goodsImg;

        @Schema(description = "商品名称")
        private String goodsName;

        @Schema(description = "商品价格")
        private String goodsPrice;

        @Schema(description = "幺币抵扣率")
        private String ysCoinDiscount;

        @Schema(description = "商品发货方式")
        private String sendGoodsMethod;

        @Schema(description = "商品库存")
        private Integer stock;

        @Schema(description = "商品分类名称")
        private String cateName;

    }

    @Data
    @Schema(description = "引入规则")
    public static class ImportRule {

        @Schema(description = "规则类型")
        private String type;

        @Schema(description = "天数")
        private Integer day;

        @Schema(description = "数量")
        private Integer num;
    }
}
